<!DOCTYPE  HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>发布</title>
	<link rel="stylesheet" href="css/Release_task.css" />
	<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
	
	<script>
	$(function(){
		// 附加需求样式
		var otherContent = document.getElementsByName('otherContent')[0];
		$('.button1').click(function(){
			if (this.style.backgroundColor == 'white' || this.style.backgroundColor == ''){
				otherContent.value += this.value + " ";
				this.style.backgroundColor = 'orange';
			}
			else {
				otherContent.value = otherContent.value.replace(this.value + " ", "");
				this.style.backgroundColor = 'white';
			}
		})
		// 获取用户电话号码和地址
		$.ajax({
			url: "CustomerInfoServlet",
			dataType : "JSON",
			success: function(customer){
				$('#tel').val(customer.tel);
				$('#addr').val(customer.addr);
			}
		})
	})
	</script>
</head>

<body>
<form method="POST" action ="TaskOperationServlet" class="login">
	<input name="operation" type="hidden" value="add" />
	<textarea name="content" rows="6" cols="120" placeholder="这里输入你要发布的内容" class="textarea"></textarea>

	<!--送达地址 -->
	<div class="address">
		<div class="address-left fl">送达地址</div>
		<div class="address-right fl" >
			<input id="addr" name="address" type="text"  placeholder="请填写你送达的地址" class="input-address"/>

		</div>
	</div>
	<div class="clear"></div>

	<!--附加需求 -->
	<div class="need">
		<div class="need-left fl">附加需求</div>
		<div class="need-right fl">
			<input name="otherContent" type="hidden" />
			<input class="button1" type="button" value="送到寝室"/>
			<input class="button1" type="button" value="代为保管"/>
			<input class="button1" type="button" value="超过五斤"/>
		</div>
	</div>
	<div class="clear"></div>
	
	<!-- 打赏路费 -->
	<div class="money">
		<div class="money-left fl">打赏路费</div>
		<div class="money-right fl">
			<select name="money" id="" style="height: 3em;width: 5em;font-size: 1.5em;margin-left: 2em;padding-left: 1em;">
				<option value="1">1元</option>
				<option value="3">3元</option>
				<option value="5">5元</option>
				<option value="10">10元</option>
				<option value="20">20元</option>
			</select>
			<!-- <input name="money" type="text"  placeholder="填写金额" class="input-address"/> -->
		</div>
	</div>
	<div class="clear"></div>


	<!-- 优惠卷-->
	<!-- <div class="card">
		<div class="card-left fl">优惠卷</div>
		<div class="card-right fr">
			<input type="submit" class="input-card" value="使用>"/>
		</div>
	</div> -->
	<div class="clear"></div>

	<!-- 帮拿快递-->
	<!-- <div class="take">
		<div class="take-left fl">是否为帮拿快递单</div>
		<div class="take-right fl">
			<input id="button4" type="button" class="input-take" onclick="change4()" value="是"/>
		</div>
	</div> -->
	<div class="clear"></div>
	<div class="money">
		<div class="money-left fl">联系电话</div>
		<div class="money-right fl">
			<input id='tel' name="tel" type="text" placeholder="联系电话" class="input-address">
		</div>
	</div>
	<div class="clear"></div>

	<div class="tabHost">
		<div onclick="location='index.html'" class="fl tab"><img src="image/tab1.png"  style="margin-left:80px"/><div class="font4">首页</div></div>
		<div class="fl tab"><img src="image/tab02.png"  style="margin-left:80px"/><div class="font4">发布任务</div></div>
		<div onclick="location='Order.html'"  class="fl tab"><img src="image/tab4.png"  style="margin-left:80px"/><div class="font4">订单</div></div>
		<div onclick="location='Person.html'" class="fl tab"><img src="image/tab3.png"  style="margin-left:80px"/><div  class="font4">个人中心</div></div>
		<div class="clear"></div>
	</div>
		<input  type="submit" class="input-login" value="发布"/>
</form>

</body>
</html>
